import moment from 'moment';


import db from './mysqlHelper.js';
//批量更新bicycleType
let sql = `
    UPDATE bicyclepos bp
    JOIN bicycle b ON bp.bicycleCode = b.bicycleCode
    SET bp.bicycleType = b.bicycleType;
`;

let res = await db.query(sql);
if (res instanceof Error) {
    console.error(`Update bicycleType error: ` + res.message);
} else {
    console.log(`Update bicycleType success`);
}